<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="static/echarts.js"></script>
    <style>
        div {
            height:700px;
            width:1000px;
            margin:auto auto;
        }
    </style>
</head>
<body>
    <div id="main"></div>
    <script>
        var chartDom = document.getElementById("main")
        var myChart = echarts.init(chartDom)
        var option;
        option = {
            series:[{
                type:"pie",
                data:[
                    {% for data in ans: %}
                        { name: '{{ data.name }}' , value: {{ data.value }} },
                    {% endfor %}
                ]
            }]
        };
        myChart.setOption(option);
    </script>
</body>
</html>